﻿using Gnivc.CarDealership.Api.Domain.Primitives;
using Gnivc.CarDealership.Api.Domain.ValueObjects;

namespace Gnivc.CarDealership.Api.Domain.Entities;

public class Vehicle : EntityBase
{
    public int ReleaseYear { get; set; }
    public int Mileage { get; set; }
    public Engine Engine { get; set; }

    public Guid ModelId { get; set; }
    public Model Model { get; set; }

    public ICollection<Price> Prices { get; set; }
    public ICollection<Reservation> Reservations { get; set; }

    private Vehicle()
        : base() { }

    public Vehicle(Guid id, Model model, int releaseYear, int mileage, Engine engine)
        : base(id)
    {
        Model = model;
        ModelId = model.Id;
        ReleaseYear = releaseYear;
        Mileage = mileage;
        Engine = engine;
    }
}